import React, { Component } from 'react';
import { connect }  from 'react-redux';
import { withRouter } from 'react-router-dom';

import Request from '@/decorator/nat';
import ISLogin from '@/decorator/islogin';
import { userStaus, clearLogin } from '@/redux/modules/userInfo';

import '@/pages/index/App.css';

@connect(
  state => state.user,
  { userStaus, clearLogin }
)
@withRouter
@Request
@ISLogin
class App extends Component {
  render() {
    return (
      <div className="App">
        {
          this.props.isLogin !== undefined ? 
          <div><h1>oasis</h1><div>{this.props.children}</div></div> 
          :
          <div>加载中...</div>
        }
      </div>
    );
  }
}

export default App;
